package com.live.alg.recur;

public class BaseRecur {
	
	/**
	 * 求1+2+。。+n的和
	 * @param n
	 * @return
	 */
	public static int fib(int n){
		if(n<=0){
			return 0;
		}else{
			return n+fib(n-1);
		}
	}
	
}
